/******************************************************************************
* Copyright (C) 2010-2011 Computer Graphics Systems Group at the 
* Hasso-Plattner-Institute (HPI), Potsdam, Germany.
*
* Lecture : Geovisualisation Summer Term 2011
* Exercise: Processing Rendering OpenStreetMap Data 
*
* Author: sebastian.pasewaldt@hpi.uni-potsdam.de
*
******************************************************************************/

#ifndef __BUILDINGNODE_H__
#define __BUILDINGNODE_H__


//[-------------------------------------------------------]
//[ Includes                                              ]
//[-------------------------------------------------------]

#include <osg/Array>
#include <osg/Geode>

#include <QString>

#include "ToggleNode.h"

//[-------------------------------------------------------]
//[ Classes                                               ]
//[-------------------------------------------------------]

class BuildingNode: public ToggleNode
{
    //[-------------------------------------------------------]
    //[ Public functions                                      ]
    //[-------------------------------------------------------]
    public:
		/**
		*  @brief
		*    Constructor
		*/
		BuildingNode(osg::ref_ptr<osg::Vec3Array> verticies, float height = 20.f);
        BuildingNode(osg::ref_ptr<osg::Vec3Array> verticies,
            const QString& name,
            const QString& addrCity,
            const QString& addrCountry,
            const QString& addrPostcode,
            const QString& addrStreet,
            const QString& addrSuburb,
            float height = 20.f);
		
		~BuildingNode();

        QString getFeatureString();

    //[-------------------------------------------------------]
    //[ Private functions                                     ]
    //[-------------------------------------------------------]
    private:
        void styleBuilding(unsigned int category);
        void setup(osg::ref_ptr<osg::Vec3Array> verticies, float height);

    private:
        QString m_name;
        QString m_addrCity;
        QString m_addrCountry;
        QString m_addrPostcode;
        QString m_addrStreet;
        QString m_addrSuburb;

};


#endif // __BUILDINGNODE_H__